using System;
using System.Configuration;
using System.IO;
using System.IO.Compression;
using System.Net;
using BookDownloader.Core.Implementation.BaseLibEngine.Parser;

namespace BookDownloader.Core.Implementation.LibRusEc.Parser
{
	public class SqlWebStreamProvider : SqlWebStreamProviderBase
	{

		protected override Uri GetUri(LibFileTypes fileType)
		{
			Uri baseUrl = new Uri(ConfigurationManager.AppSettings["SQLWebFolder"]);
			string path = String.Empty;
			switch (fileType)
			{
				case LibFileTypes.Author:
					path = @"libavtors.sql.gz";
					break;
				case LibFileTypes.Book:
					path = @"libbook.sql.gz";
					break;
				case LibFileTypes.AuthorBook:
					path = @"libavtor.sql.gz";
					break;
			}
			Uri url = new Uri(baseUrl, path);
			return url;
		}
	}
}